<?php

namespace app\common\util;

use app\common\model\BusinessAdmin;

/**
 * 企业管理员登录信息
 */
class BusinessAdminLoginInfo
{
    private static $admin = null;
    private static $admin_id = null;
    private static $business_id = null;

    public static function setAdmin(BusinessAdmin $admin)
    {
        if (!empty($admin)) {
            self::$admin = $admin;
            self::$admin_id = $admin->id;
            self::$business_id = $admin->business_id;
        }
        return $admin;
    }

    public static function getAdmin()
    {
        return self::$admin;
    }

    public static function getAdminId()
    {
        return self::$admin_id;
    }

    public static function getBusinessId()
    {
        return self::$business_id;
    }
}
